package cn.scw.project.goods.mapper;

import cn.scw.project.goods.domain.GCommodityOrder;
import cn.scw.project.goods.domain.netework.bean.GCommodityOrderListReq;
import cn.scw.project.goods.domain.vo.GCommodityOrderVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品订单Mapper接口
 *
 * @author api
 * @date 2020-05-20
 */
public interface GCommodityOrderMapper
{
    /**
     * 查询商品订单
     *
     * @param id 商品订单ID
     * @return 商品订单
     */
    public GCommodityOrderVo selectGCommodityOrderVoById(Long id);

    public GCommodityOrder selectGCommodityOrderById(Long id);

    /**
     * 查询商品订单列表
     *
     * @param req 商品订单
     * @return 商品订单集合
     */
    public List<GCommodityOrderVo> selectGCommodityOrderList(GCommodityOrderListReq req);

    List<GCommodityOrderVo> selectGCommodityOrderUserList(@Param("statusCode") String statusCode);

    /**
     * 新增商品订单
     *
     * @param gCommodityOrder 商品订单
     * @return 结果
     */
    public int insertGCommodityOrder(GCommodityOrder gCommodityOrder);

    /**
     * 修改商品订单
     *
     * @param gCommodityOrder 商品订单
     * @return 结果
     */
    public int updateGCommodityOrder(GCommodityOrder gCommodityOrder);

    /**
     * 删除商品订单
     *
     * @param id 商品订单ID
     * @return 结果
     */
    public int deleteGCommodityOrderById(Long id);

    /**
     * 批量删除商品订单
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteGCommodityOrderByIds(Long[] ids);

    GCommodityOrder selectGCommodityOrderByNumber(String number);
}
